package codename.carrot.bomberman.game.gamemessages;

import codename.carrot.bomberman.network.interfaces.NetworkMessage;

/**
 *  Represents a networkmessage to be used in the game
 * @author Gruppe A4
 *
 */
public class BombermanMessage implements NetworkMessage {
	/**
	 * The UID for serialization
	 */
	private static final long serialVersionUID = 1L;		
	/**
	 * the ID of the player that sent this message
	 */
	private int playerId = -1;	
	
	/**
	 * Constructor
	 */
	public BombermanMessage() {}

	/**
	 *  Constructor
	 * @param playerId the ID of the player that created this message
	 */
	public BombermanMessage(int playerId) {
	    this.playerId = playerId;
	}
	
	/**
	 * Returns the ID of the player that sent/created this message
	 * @return the ID of the player
	 */
	public int getPlayerId() {
		return playerId;
	}

	/**
	 * Sets the ID of the player that sent this message
	 * @param playerId the ID of the player
	 */
	public void setPlayerId(int playerId) {
		this.playerId = playerId;
	}

}
